/*
 * 首页路由
 *
 * @Author:
 * @Date:      2022-09-06 20:51:41
 * @Wechat: 
 * @Email: 
 * @Copyright 
 */
import { HOME_PAGE_NAME } from '../../constants/home-const';
import { MENU_TYPE_ENUM } from '../../constants/menu-const';
import Layout from '/@/layout/index.vue';

import NotFound from '/@/views/system/40X/404.vue';
import NoPrivilege from '/@/views/system/40X/403.vue';

export const homeRouters = [
  {
    path: '/',
    name: '_home',
    redirect: { name: HOME_PAGE_NAME },
    component: Layout,
    meta: {
      title: '首页',
      menuType: MENU_TYPE_ENUM.CATALOG.value,
      icon: 'HomeOutlined',
    },
    children: [
      { path: '/:pathMatch(.*)*', name: '404', component: NotFound },
      { path: '/403', name: '403', component: NoPrivilege },
      {
        path: '/home',
        name: HOME_PAGE_NAME,
        meta: {
          title: '首页',
          menuType: MENU_TYPE_ENUM.MENU.value,
          icon: 'HomeOutlined',
          parentMenuList: [{ name: '_home', title: '首页' }],
        },
        component: () => import('/@/views/system/home/index.vue'),
      },
      {
        path: '/account',
        name: 'Account',
        component: () => import('/@/views/system/account/index.vue'),
        meta: {
          title: '个人中心',
          hideInMenu: false,
        },
      },
    ],
  },
];
